export default {
	namespaced: true,
	// 数据
	state: {
		address: uni.getStorageSync('address') || {}
	},
	// 更新state里面的数据
	mutations: {
		// 更新收货地址方法
		updateAddress(state, payload) {
			state.address = payload
			uni.setStorageSync('address', payload)
		}
	},
	// 根据state进行派生数据
	getters: {
		addStr(state) {
			return state.address.provinceName + state.address.cityName + state.address.countyName + state.address
				.detailInfo
		}
	}
}
